Use libatomic for 64-bit operations
authorDebian Haskell Group <pkg-haskell-maintainers@lists.alioth.debian.org>
Fri, 15 Jul 2022 14:03:35 +0000 (15:03 +0100)
committerIlias Tsitsimpis <iliastsi@debian.org>
Fri, 15 Jul 2022 14:03:35 +0000 (15:03 +0100)
commit21f1d9221eccf6a91fdbef1f4c9339b159537d1f
treed0579b4c977ba2b5f5c33271e6ca7269f5f01815
parent5b21150c8e1d90c2cddf2b0f39396969bf25e779
Use libatomic for 64-bit operations

The rts package uses GCC's __atomic built-in functions on 64-bit values. This
is not supported on some 32bit platforms (e.g., mipsel) resulting in the
following compilation error:
   rts/dist/build/libHSrts_thr-ghc8.10.7.so: error: undefined reference to '__atomic_load_8'
   rts/dist/build/libHSrts_thr-ghc8.10.7.so: error: undefined reference to '__atomic_store_8'
   rts/dist/build/libHSrts_thr-ghc8.10.7.so: error: undefined reference to '__atomic_fetch_add_8'

 Fix this by linking against libatomic.
Author: Ilias Tsitsimpis <iliastsi@debian.org>
Bug: https://gitlab.haskell.org/ghc/ghc/-/issues/20549
Forwarded: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6820

Gbp-Pq: Name latomic-64bit
configure.ac